package cc.aiee.demo.springboot.controller.applepay;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;

@RestController
@RequestMapping("/applepay/union")
@Tag(name = "苹果支付(union pay)")
//@Api(tags = "苹果支付(union pay)")
@Slf4j
public class ApplePayUnionController {
//
//	@Autowired
//	private UnionPayProperties properties;

//	@PostMapping("/appTransReq")
////	@ApiOperation(value = "消费接口", notes = "")
//	@Operation(summary = "消费接口")
//	public @ResponseBody String appTransReq(UnionAppTransQuery trans) {
//
//		log.info("\n银联支付配置(properties)信息 =>  {}", JSONUtil.toJsonPrettyStr(properties));
//
//		PayAppTransReqModel model = trans.model(new PayAppTransReqModel());
//
//		model.setBackUrl(properties.getNotify_url()).setMerId(properties.getMerId())
//				.setSignMethod(PayUnionSignMethodConstant.RSA);
//		
//		log.info("\n银联支付请求(request model) => {}", JSONUtil.toJsonPrettyStr(model));
//		PayUnionApplePayApi  api = new PayUnionApplePayApi();
//		api.openSandBox(true);
//		api.appTransReq(model,properties);
//		return "ok";
//	}
}
